package com.gitee.mrj.aiboot.annotation.config.sf.ui.widget;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
@Documented
public @interface SFMentionWidget {


    // SFDLSSize size() default SFDLSSize.DEFAULT;

    /**
     * 在文字框中显示提示讯息
     */
    String placeholder() default "";

    /**
     * 未找到时的内容，默认：`无匹配结果，轻敲空格完成输入`
     */
    String notFoundContent() default "";

    /**
     * 建议框位置，默认：`button`
     */
    Placement placement() default Placement.BUTTON;

    /**
     * 触发弹出下拉框的字符，默认：`@`
     */
    String[] prefix() default {};

    /**
     * 文本框类型，默认：`text`
     */
    InputStyle inputStyle() default InputStyle.TEXT;

    /**
     * 自适应内容高度，可设置为 `true|false` 或对象：`{ minRows: 2, maxRows: 6 }`
     */
    boolean autosize() default true;

    int minRows() default Integer.MIN_VALUE;

    int maxRows() default Integer.MIN_VALUE;


    public enum InputStyle {
        TEXT("text"),
        TEXTAREA("textarea");

        private final String type;

        InputStyle(String type) {
            this.type = type;
        }

        public String type() {
            return this.type;
        }
    }

    public enum Placement {
        BUTTON("button"),
        TOP("top");

        private final String type;

        Placement(String type) {
            this.type = type;
        }

        public String type() {
            return this.type;
        }
    }
}
